SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.DnnProduct_AddTabPermission
	@TabID int,
	@PermissionID int,
	@RoleID int,
	@AllowAccess bit,
    @UserID int,
	@CreatedByUserID  int
AS

	INSERT INTO dbo.DnnProduct_TabPermission (
		[TabID],
		[PermissionID],
		[RoleID],
		[AllowAccess],
		[UserID],
		[CreatedByUserID],
		[CreatedOnDate],
		[LastModifiedByUserID],
		[LastModifiedOnDate]
	) VALUES (
		@TabID,
		@PermissionID,
		@RoleID,
		@AllowAccess,
		@UserID,
		@CreatedByUserID,
		getdate(),
		@CreatedByUserID,
		getdate()
	)

	select SCOPE_IDENTITY()

GO
